<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>主轴侧轴对齐方式</title>
    <style>
        .box{
            width: 500px;
            height: 500px;
            border: 1px solid black;
            margin: 0 auto;
            display: flex;
            /* 调整主轴对齐方向
            flex-start:  主轴开始
            flex-end:  主轴结束
            center: 主轴居中
            space-around: 距离环绕 每个子元素占用空间一样
            space-between: 子元素两端对齐
            */
            justify-content: space-around;
            /*调整侧轴对齐方向
            flex-start:  侧轴开始
            flex-end:  侧轴结束
            center: 侧轴居中
            */
            align-items: center;
        }
        .box div{
            width: 100px;
            height: 100px;
            border: 1px dashed red;
        }
    </style>
</head>
<body>
    <div class="box">
        <div>1111111</div>
        <div>2222</div>
        <div>3333</div>
        <div>444444</div>
    </div>
</body>
</html>